<script type="text/javascript">
setInterval("countdown()", 100);
function countdown()
{
	var charCounter = document.getElementById("charCounter");
	var obj = document.getElementById("tweetbox");
	var iCurrent = obj.value.length;
	charCounter.innerHTML = 140-iCurrent;
}
</script>
<table id="maintable" cellspacing="0">

<tr>
	<td id="spacercol"></td>
	<td id="logocell" align="right"><a href="index.php"><img src="<?php

$using_ie6 = (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.') !== FALSE);
if ($using_ie6)
{
echo "images/cplogo.gif";
}
else
{
echo "images/cplogo.png";
}
?>" border="0" alt="<?php echo $siteDescription; ?>" />
</a></td>
		<td id="entrycell">
				<img src="images/one.gif" width="796px" height="0" />
				<form action="post.php" action="post">
				<table>
				<tr>
				<td>What's <a href="index.php?start=listing&arg=hap">--hap:</a>?</td>
				<td align="right"><div id="charCounter">140</div></td>
				</tr>
				<tr>
				<td colspan="2">
				<textarea id="tweetbox" name="rawtweet"></textarea>
				<br />
				<small>Ex: Look at the cute fish: --a:2</small>
				</td>
				</tr>
				<tr>
				<td align="right" colspan="2">
<?php

if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret']))
{
?>
<a href="./toath/redirect.php"><img src="./toath/images/lighter.png" alt="Sign in with Twitter" border="0" /></a>
<?php
}
else
{

?>
<a href="./toath/clearsessions.php" id="signoutlink">Sign out</a><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
				<input type="submit" value="update" />
<?php
}
?>
				</td>
				</tr>
				</table>
			</form> 
		</td>
		
	<td id="spacercol"></td>
</tr>
</table>
